package com.xjust.service.impl;

import com.xjust.Mapper.PrescriptionMapper;
import com.xjust.pojo.Prescription;
import com.xjust.service.PrescriptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.beans.IntrospectionException;
import java.util.List;
import java.util.Map;

@Service
public class PrescriptionServiceImpl implements PrescriptionService {
    @Autowired
   private PrescriptionMapper prescriptionMapper;
    //保存开药信息
    @Override
    public void insertPrescription(List<Map<String,Object>> prescription) {

        for (Map<String, Object> map : prescription) {
            map.put("drug_state","已开立");
            prescriptionMapper.insertPrescription(map);
        }

    }
}
